#include <iostream>

using namespace  std;

class A
{
	public:
		A(int major,int minor,int error):ma(major),mi(minor),en(error),str()
		{
		}
		~A(){}

	private:
		int ma;
		int mi;
		int en;
		std::string str;
};


class B
{
};

int main(int argc, char **argv)
{
	int i = 1;

	try
	{
		if(i==0)
			throw 7;
		else if(i == 1)
			throw A(6,3,0);
		return 0;
	}
	catch (int e)
	{
		cout << "catch exception: " << e << endl;		
		return -1;
	}
	catch (A e)
	{
		cout << "catch class A exception." << endl;
		return -2;
	}
}

